<template>
  <div id="header" :style="{ background: curNav.bgColor }">{{ curNav.title }}</div>
</template>

<script>
import { mapState } from "vuex";

export default {
  name: "MyHeader",
  computed: {
    ...mapState(['curNav'])
  },
};
</script>

<style lang="scss" scoped>
#header {
  position:fixed;
  top: 0;
  width: 100%;
  height: 50px;
  background: #ccc;
  text-align: center;
  line-height: 50px;
}
</style>